<?php 
	session_start(); 
	//Si la variable de session $_SESSION['connexion_auto'] existe, c'est que l'utilisateur a choisi la connexion automatique
	if(isset($_SESSION['connexion_auto'])) {
		setcookie('pseudo', $_SESSION['pseudo'], time() + 31*24*3600, null, null, false, true);
		setcookie('statut', $_SESSION['statut'], time() + 31*24*3600, null, null, false, true);
		setcookie('id', $_SESSION['id'], time() + 31*24*3600, null, null, false, true);
	}
	if(isset($_COOKIE['pseudo']) && isset($_COOKIE['statut']) && isset($_COOKIE['id'])) {
		$_SESSION['pseudo'] = $_COOKIE['pseudo'];
		$_SESSION['statut'] = $_COOKIE['statut'];
		$_SESSION['id'] = $_COOKIE['id'];
	}
?>

<!DOCTYPE html>
<html>	
	<head>
        <title>Cameleon events - Sorties et Evénements en France</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" href="../Vue/CSS/index.css" />
		<script type="text/javascript" src="../Vue/JavaScript/jquery-1.2.6.min.js"></script>
		<script type="text/javascript" src="../Vue/JavaScript/animeImage.js"></script>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
		<script src="../Vue/JavaScript/slides.min.jquery.js"></script>
		<script>
			$(function(){
				$('#slides').slides({
					preload: true,
					generateNextPrev: true,
					play: 5000
				});
			});
		</script>
    </head>
	
	<body>
		<?php
			include('../Modele/traitement_evenements.php');
			include('../Vue/index.php'); 
		?>
	</body>
</html>